/* 全局变量 */
:root {
  /* 主色调 - 法律蓝与古典金色 */
  --primary-color: #1a2b48; /* 深蓝色：代表法律的庄重 */
  --secondary-color: #a67c00; /* 古典金色：代表正义的天平 */
  --accent-color: #8b0000; /* 深红色：代表案件与争议 */
  --light-color: #f8f0dd; /* 羊皮纸色：代表古老法典 */
  --dark-color: #0e1620; /* 深墨色：代表严肃与规范 */
  --adventure-color: #5c8374; /* 冒险绿色：代表探险精神 */
  
  /* 文字颜色 */
  --text-primary: #121212;
  --text-secondary: #4a4a4a;
  --text-light: #f8f0dd;
  
  /* 间距和边框 */
  --border-radius-lg: 12px;
  --border-radius-md: 8px;
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 加载界面样式 */
.loading-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
  background-color: var(--light-color);
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5z' fill='%231a2b48' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.loading-container::before {
  content: "⚖️";
  position: absolute;
  font-size: 200px;
  opacity: 0.05;
  z-index: 0;
}

.loading-content {
  width: 80%;
  max-width: 600px;
  text-align: center;
  padding: 30px;
  background-color: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--secondary-color);
  position: relative;
  z-index: 1;
  animation: fadeIn 0.5s ease-out;
}

.loading-content h2 {
  margin-bottom: 20px;
  color: var(--primary-color);
  font-family: 'Cinzel', 'Noto Serif SC', serif;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.loading-content p {
  margin-top: 15px;
  color: var(--text-secondary);
}

/* 游戏界面样式 */
.ant-layout {
  background-color: var(--light-color) !important;
  position: relative;
}

.ant-layout::before {
  content: "⚖️";
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 400px;
  opacity: 0.03;
  z-index: 0;
  pointer-events: none;
}

.ant-layout-header {
  background: var(--primary-color) !important;
  background-image: linear-gradient(to right, var(--primary-color), var(--dark-color));
  border-bottom: 4px solid var(--secondary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.ant-layout-header::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 4px;
  background-image: linear-gradient(90deg, 
    transparent, var(--accent-color), transparent, 
    var(--secondary-color), transparent, 
    var(--adventure-color), transparent
  );
  opacity: 0.6;
}

.ant-layout-header h3 {
  font-family: 'Cinzel', 'Noto Serif SC', serif !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--light-color) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3),
               0 0 10px rgba(166, 124, 0, 0.5);
}

.status-container {
  display: flex;
  justify-content: space-between;
  margin: 20px auto;
  max-width: 1000px;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.player-status, .boss-status {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  flex: 1;
  border: 1px solid rgba(166, 124, 0, 0.3);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.player-status:hover, .boss-status:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.player-status::before, .boss-status::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.player-status::before {
  background: linear-gradient(90deg, var(--adventure-color), var(--primary-color));
}

.boss-status::before {
  background: linear-gradient(90deg, var(--accent-color), var(--dark-color));
}

.player-status h4, .boss-status h4 {
  color: var(--primary-color);
  font-family: 'Cinzel', 'Noto Serif SC', serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

/* 问题容器样式 */
.ant-layout-content {
  padding: 24px !important;
  max-width: 1200px;
  margin: 0 auto !important;
  position: relative;
  z-index: 1;
}

.ant-typography {
  color: var(--text-primary) !important;
  font-family: 'Noto Serif SC', serif !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', 'Noto Serif SC', serif !important;
  color: var(--primary-color) !important;
  letter-spacing: 1px;
}

/* 选项按钮样式 */
.ant-btn {
  border-radius: var(--border-radius-md) !important;
  border: 2px solid rgba(166, 124, 0, 0.3) !important;
  transition: all 0.3s ease !important;
  background-color: rgba(255, 255, 255, 0.9) !important;
}

.ant-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--secondary-color) !important;
}

.ant-btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--secondary-color) !important;
  color: var(--light-color) !important;
}

.ant-btn-primary:hover {
  background-color: var(--secondary-color) !important;
  border-color: var(--primary-color) !important;
}

/* 底部按钮容器 */
.ant-layout-footer {
  background: transparent !important;
  text-align: center;
  padding: 24px !important;
  position: relative;
  z-index: 1;
}

/* 弹窗样式 */
.ant-modal-content {
  border-radius: var(--border-radius-lg) !important;
  border: 1px solid var(--secondary-color);
  background-color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: var(--shadow-lg);
}

.ant-modal-header {
  border-bottom: 1px solid var(--secondary-color) !important;
  background-color: var(--primary-color) !important;
  border-radius: calc(var(--border-radius-lg) - 1px) calc(var(--border-radius-lg) - 1px) 0 0 !important;
  padding: 16px 24px !important;
}

.ant-modal-title {
  color: var(--light-color) !important;
  font-family: 'Cinzel', 'Noto Serif SC', serif !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 进度条样式 */
.ant-progress-bg {
  background-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color)) !important;
}

/* 媒体查询 */
@media (max-width: 768px) {
  .status-container {
    flex-direction: column;
  }
  
  .player-status, .boss-status {
    margin-bottom: 10px;
  }
  
  .ant-layout-content {
    padding: 12px !important;
  }
}

/* 状态信息 */
.status-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.status-label {
  display: flex;
  align-items: center;
  color: var(--primary-color);
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 10px;
  font-family: 'Cinzel', 'Noto Serif SC', serif;
}

.status-value {
  font-weight: 600;
  font-size: 18px;
  min-width: 30px;
  text-align: right;
  color: var(--primary-color);
  font-family: 'Cinzel', serif;
}

.dice-count, .attack-points, .special-effect {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Noto Serif SC', serif;
  color: var(--text-secondary);
}

.special-effect {
  cursor: pointer;
  padding: 4px 8px;
  border: 1px dashed var(--secondary-color);
  border-radius: var(--border-radius-md);
  transition: all 0.3s;
}

.special-effect:hover {
  background-color: rgba(166, 124, 0, 0.1);
}

.question-container {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin: 20px 0;
  position: relative;
  border: 1px solid var(--secondary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.question-container:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.question-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 30px;
}

.option-button {
  height: auto !important;
  padding: 15px !important;
  text-align: left;
  position: relative;
  overflow: hidden;
  white-space: normal !important;
  border: 2px solid var(--primary-color) !important;
  background-color: rgba(255, 255, 255, 0.9) !important;
  transition: all 0.3s ease !important;
}

.option-button::before {
  content: "";
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(26, 43, 72, 0.05),
    transparent
  );
  transition: all 0.5s ease;
}

.option-button:hover::before {
  left: 100%;
}

.option-button.selected {
  background-color: var(--primary-color) !important;
  color: var(--light-color) !important;
  border-color: var(--secondary-color) !important;
}

.option-key {
  position: absolute;
  left: 10px;
  top: 10px;
  font-family: 'Cinzel', serif;
  font-weight: bold;
}

.option-value {
  margin-left: 25px;
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
}

.loading-question {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loading-question p {
  margin-top: 20px;
  font-family: 'Noto Serif SC', serif;
  color: var(--text-secondary);
}

/* 操作按钮样式 */
.action-button {
  min-width: 150px;
  padding: 12px 24px !important;
  height: auto !important;
  font-family: 'Cinzel', 'Noto Serif SC', serif !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  margin: 0 10px;
}

.action-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: all 0.6s ease;
}

.action-button:hover::after {
  left: 100%;
}

.confirm-button {
  background-color: var(--adventure-color) !important;
  border-color: var(--primary-color) !important;
}

.dice-button {
  background-color: var(--secondary-color) !important;
  border-color: var(--primary-color) !important;
}

.dice-button:disabled {
  background-color: #cccccc !important;
  border-color: #aaaaaa !important;
  color: #888888 !important;
}

/* 特效动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* 组件动画 */
.question-container {
  animation: fadeIn 0.5s ease-out;
}

.status-container {
  animation: fadeIn 0.5s ease-out;
}

.status-item {
  animation: fadeIn 0.5s ease-out;
  animation-delay: calc(var(--item-index) * 0.1s);
}

/* 媒体查询 - 响应式调整 */
@media (max-width: 768px) {
  .options-grid {
    grid-template-columns: 1fr;
  }
  
  .status-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .dice-count, .attack-points, .special-effect {
    margin-top: 5px;
  }
  
  .action-button {
    min-width: 120px;
    padding: 10px 16px !important;
    font-size: 14px !important;
  }
}

/* 游戏结束样式 */
.game-over-content {
  max-height: 70vh;
  overflow-y: auto;
  padding: 10px 0;
  font-family: 'Noto Serif SC', serif;
  color: var(--text-secondary);
}

.game-over-content::-webkit-scrollbar {
  width: 8px;
}

.game-over-content::-webkit-scrollbar-track {
  background: rgba(26, 43, 72, 0.1);
  border-radius: 4px;
}

.game-over-content::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.final-question-review {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid var(--secondary-color);
  border-radius: var(--border-radius-md);
  background-color: rgba(248, 240, 221, 0.5);
}

.final-question-review h4 {
  margin-bottom: 15px;
  color: var(--primary-color);
  font-family: 'Cinzel', 'Noto Serif SC', serif;
}

.final-question-review .ant-tag {
  margin-right: 8px;
  font-family: 'Noto Serif SC', serif;
}

.final-question-review .ant-typography {
  color: var(--text-secondary) !important;
  font-family: 'Noto Serif SC', serif !important;
}

.final-question-review strong {
  color: var(--accent-color);
  font-weight: 600;
}

@media (max-width: 768px) {
  .game-over-content {
    max-height: 60vh;
  }
  
  .final-question-review {
    padding: 10px;
  }
}
